package com.zh.springcloud;

import com.zh.myrule.MySelfRule;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.cloud.netflix.ribbon.RibbonClients;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * @Description:
 * @ClassName OrderApplication
 * @date: 2021.06.09 11:01
 * @Author: zhanghang
 */
@SpringBootApplication
@EnableEurekaClient
@EnableFeignClients
// 使用ribbon定制化配置，name是调用的服务名，configuration是使用的规则，可用配置多个
@RibbonClients(value = {
		@RibbonClient(name = "cloud-payment-service",configuration = MySelfRule.class)
})
public class OrderFeignApplication {

	public static void main(String[] args) {
		SpringApplication.run(OrderFeignApplication.class,args);
	}

}
